package com.zrwl.poscloud.base.enums;

/**
 * 业务类型
 */
public enum EBusiType {

    merchantCode(100101, 1, 4, "代理商编号4位36进制"),//代理商编号4位32进制
    companyCode(100102, 1, 5, "商户编号5位36进制"),//商户编号5位32进制
    formCode(100103, 1, 10, "表单序号10位10进制"),//表单序号10位10进制
    companyProduct(100104, 1, 4, "商户产品编号4位32进制"),//商户产品编号4位32进制
    companyProductMenu(100105, 1, 4, "商户产品菜单编号1位32进制"),//商户产品菜单编号1位32进制
    businessProductCell(100106, 1, 3, "商务产品类型编号1位32进制"),//商务产品类型编号1位32进制
    businessProduct(100107, 1, 9, "商务产品编号9位32进制"),//商务产品编号1位32进制
    businessUsing(100108, 1, 9, "商务使用情况编号9位32进制"),//商务产品编号1位32进制

    employeeCode(102101, 1, 9, "人员编号-点击获取"),//人员编号-点击获取

    employeeAccountOpen(102102, 1, 9, "人员账户业务-开户"),//人员账户业务-开户

    employeeAccountEdit(102103, 1, 9, "人员账户业务-编辑"),//人员账户业务-编辑
    employeeAccountModifyLimitEdit(10210301, 1, 9, "人员账户业务-编辑限额"),//人员账户业务-编辑限额
    employeeAccountBatchModifyLimitEdit(10210302, 1, 9, "人员账户业务-批量编辑限额"),//人员账户业务-批量编辑限额

    employeeAccountRecharge(102104, 1, 9, "人员账户业务-充值"),//人员账户业务-充值
//    employeeAccountCashRecharge(10210401, 1, 9, "人员账户业务-现金充值"),//人员账户业务-现金充值
//    employeeAccountOnlineRecharge(10210402, 1, 9, "人员账户业务-在线充值"),//人员账户业务-在线充值

    employeeAccountCashOut(102105, 1, 9, "人员账户业务-提现"),//人员账户业务-提现
//    employeeAccountOfflineCashOut(10210501, 1, 9, "人员账户业务-现金提现"),//人员账户业务-线下提现
//    employeeAccountOnlineCashOut(10210502, 1, 9, "人员账户业务-在线提现"),//人员账户业务-在线提现

    employeeAccountTransfer(102106, 1, 9, "人员账户业务-转账"),//人员账户业务-转账

    employeeAccountTrapping(102107, 1, 9, "人员账户业务-圈存"),//人员账户业务-圈存
    employeeAccountSubsidyTrapping(10210701, 1, 9, "人员账户业务-圈存补贴账户"),//人员账户业务-补贴圈存
    employeeAccountSecondTrapping(10210702, 1, 9, "人员账户业务-圈存副账户"),//人员账户业务-圈存
    employeeAccountCircleBack(10210703, 1, 9, "人员账户业务-圈回"),//人员账户业务-圈回

    employeeAccountLeave(102108, 1, 9, "人员账户业务-离开"),//人员账户业务-离开
    employeeAccountBatchLeave(10210801, 1, 9, "人员账户业务-批量离开"),//人员账户业务-批量离开

    employeeAccountRestore(102109, 1, 9, "人员账户业务-恢复"),//人员账户业务-恢复
    employeeAccountBatchRestore(10210901, 1, 9, "人员账户业务-批量恢复"),//人员账户业务-批量恢复

    employeeAccountDelete(102110, 1, 9, "人员账户业务-注销"),//人员账户业务-注销
    employeeAccountReplacePaying(102111, 1, 9, "人员账户业务-签约支付"),//人员账户业务-代扣
    employeeAccountReplaceRechargeAccount(102112, 1, 9, "人员账户业务-签约退回"),//人员账户业务-账户代充
    employeeAccountReplaceRechargeWX(102113, 1, 9, "人员账户业务-退回并提现"),//人员账户业务-微信代充
    icCardCode(102201, 1, 9, "卡号-换卡开卡获取"),//卡号-换卡开卡获取
    icCardOpen(102202, 1, 9, "卡片业务-开卡"),//卡片业务-开卡
    icCardOpenRecharge(102104, 1, 9, "卡片业务-开卡充值"),//卡片业务-开卡充值 和普通充值无区别
    icCardOpenDeduction(10220202, 1, 9, "卡片业务-开卡扣费"),//卡片业务-开卡扣费
    icCardEdit(102203, 1, 9, "卡片业务-参数修改"),//卡片业务-参数修改
    icCardLost(102204, 1, 9, "卡片业务-挂失"),//卡片业务-挂失
    icCardChange(102205, 1, 9, "卡片业务-换卡、补卡"),//卡片业务-换卡、补卡
    icCardChangeRecharge(102104, 1, 9, "卡片业务-换卡充值"),//卡片业务-换卡充值 和普通充值无区别
    icCardChangeDeduction(10220502, 1, 9, "卡片业务-换卡扣费"),//卡片业务-换卡扣费
    icCardStop(102206, 1, 9, "卡片业务-停用"),//卡片业务-停用
    icCardCheckOut(102206, 1, 9, "卡片业务-退卡"),//卡片业务-退卡
    icCardStopOfflineCashOut(10220601, 1, 9, "卡片业务-退卡现金提现"),//卡片业务-线下提现
    icCardStopOnlineCashOut(10220602, 1, 9, "卡片业务-退卡在线提现"),//卡片业务-在线提现
    icCardCheckOutFee(102207, 1, 9, "卡片业务-退卡押金"),//卡片业务-退卡押金
    icCardFind(102208, 1, 9, "卡片业务-解挂"),//卡片业务-解挂

    icCardAuthFlowCode(102301, 1, 4, "白名单序号"),//白名单序号

    subsidyIssueSubsidies(102401, 1, 9, "补贴发放-下发补贴"),//补贴发放-下发补贴
    subsidyRevokeSubsidy(102402, 1, 9, "补贴发放-撤销补贴"),//补贴发放-撤销补贴
    subsidySingleRecall(10240201, 1, 9, "补贴发放-单条撤回"),//补贴发放-单条撤回
    subsidyBatchRecall(10240202, 1, 9, "补贴发放-批量撤回"),//补贴发放-批量撤回
    subsidyRevokeExpired(10240203, 1, 9, "补贴发放-过期撤销"),//补贴发放-过期撤销
    subsidyTrade(10240204, 1, 10, "补贴消费-刷卡消费"),//补贴消费-刷卡消费
    subsidyRefund(10240205, 1, 10, "补贴消费-刷卡退回"),//补贴消费-刷卡退回
    cloudTrade(10240206, 1, 10, "云端业务-扣款"),//云端业务-扣款
    cloudRefund(10240207, 1, 10, "云端业务-补款"),//云端业务-补款

    mealOrderAdd(102501,1,9,"餐单记录-新增餐单"),
    mealOrderEdit(102502,1,9,"餐单记录-编辑餐单"),
    mealOrderDel(102503,1,9,"餐单记录-删除餐单"),

    mealOrderPay(102504,1,9,"餐单记录-付款"),
    mealOrderDeposit(10250401,1,9,"餐单记录-支付订金"),
    mealOrderFinalPay(10250402,1,9,"餐单记录-支付尾款"),

    mealOrderRefund(102505,1,9,"餐单记录-订餐期退款"),
    mealOrderMealRefund(10250501,1,9,"餐单记录-订餐期退款"),
    mealOrderOverdueRefund(10250502,1,9,"餐单记录-逾期退款"),

    baseHouseCode(102901, 1, 4, "创建经营场所"),//创建经营场所

    employeeFaceCardCode(102111, 1, 11, "人员人脸卡编号"),//人员人脸卡编号

    userServiceOrderCode(120001, 1, 9, "用户服务订单号-点击获取"),//用户服务订单号-点击获取
    callProductCode(120002, 1, 9, "通话服务产品编号-点击获取"),//用户服务订单号-点击获取
    callOrderCode(120003, 1, 9, "通话服务订单编号-点击获取"),//用户服务订单号-点击获取
    /**
     * 演示-End
     */
    Example(0, 1, 100, "测试");

    private final int type;
    private final int start;
    private final int length;
    private final String name;

    EBusiType(int type, int start, int length, String name) {
        this.type = type;
        this.start = start;
        this.length = length;
        this.name = name;
    }

    public int getStart() {
        return start;
    }

    public int getLength() {
        return length;
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static EBusiType getByValue(int value) {
        for (EBusiType busiType : values()) {
            if (busiType.getType() == value) {
                return busiType;
            }
        }
        return null;
    }
}